//
//  XLMShareSdkTool.h
//  xiaoLeMusic
//
//  Created by wukong on 2018/8/29.
//  Copyright © 2018年 xiaoLe. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <ShareSDK/ShareSDK.h>
#import <ShareSDKConnector/ShareSDKConnector.h>
//#import <ShareSDKUI/ShareSDKUI.h>
//#import <ShareSDKUI/SSUIShareActionSheetStyle.h>
//腾讯开放平台（对应QQ和QQ空间）SDK头文件
//#import <TencentOpenAPI/TencentOAuth.h>
//#import <TencentOpenAPI/QQApiInterface.h>
//微信SDK头文件
#import "WXApi.h"
#import <WechatAuthSDK.h>
//#import "WeiboSDK.h"
#import <WXApiObject.h>
#import <UIKit/UIKit.h>
typedef void(^ThirdLoginResult)(BOOL success, NSDictionary *dic);
typedef void(^shareSuccessBlock)(void);
typedef void(^shareFailBlock)(NSString *message);
typedef void (^doneblock)(SSDKResponseState state);


@protocol WXApiManagerDelegate <NSObject>

@optional

- (void)managerDidRecvGetMessageReq:(GetMessageFromWXReq *)request;
- (void)managerDidRecvShowMessageReq:(ShowMessageFromWXReq *)request;
- (void)managerDidRecvLaunchFromWXReq:(LaunchFromWXReq *)request;
- (void)managerDidRecvMessageResponse:(SendMessageToWXResp *)response;
- (void)managerDidRecvAuthResponse:(SendAuthResp *)response;
- (void)managerDidRecvAddCardResponse:(AddCardToWXCardPackageResp *)response;

@end

@interface XLMShareSdkTool : NSObject<WXApiDelegate>

@property (nonatomic, assign) id<WXApiManagerDelegate> delegate;

+(XLMShareSdkTool *) shareInstance;
@property (copy, nonatomic) ThirdLoginResult loginBlock;

/**
 *  注册ShareSDK
 */
+(void)registerShare;
/**
 *  分享图片、文本、URL等信息(微信好友、微信朋友圈、微信收藏、新浪微博、QQ好友、QQ空间、短信、邮件)
 */
+(void)shareContentWithShareContentType:(SSDKContentType)shareContentType
                           contentTitle:(NSString *)contentTitle
                     contentDescription:(NSString *)contentDescription
                           contentImage:(id)contentImage
                             contentURL:(NSString *)contentURL
                             showInView:(UIView *)showInView
                                success:(shareSuccessBlock)success
                                failure:(shareFailBlock)failure
                    OtherResponseStatus:(void (^)(SSDKResponseState state))otherResponseStatus;
/**
 *  分享图片、文本、URL等信息(微信朋友圈)
 */
+(void)shareWechatTimelineContentWithShareContentType:(SSDKContentType)shareContentType
                                         contentImage:(id)contentImage
                                       onStateChanged:(doneblock)block;


+(void)shareInviteCodeWithShareContentType:(SSDKPlatformType)sharePlatformType
                                   content:(NSString *)content
                            onStateChanged:(doneblock)block;



/**
 *  分享文件(仅微信好友)
 */
+ (void)shareVideoContentParamsByText:(NSString *)text
                                title:(NSString *)title
                                  url:(NSString *)url
                           thumbImage:(id)thumbImage
                                image:(id)image
                         musicFileURL:(NSURL *)musicFileURL
                              extInfo:(NSString *)extInfo
                             fileData:(id)fileData
                         emoticonData:(id)emoticonData
                  sourceFileExtension:(NSString *)fileExtension
                       sourceFileData:(id)sourceFileData
                                 type:(SSDKContentType)type
                   forPlatformSubType:(SSDKPlatformType)platformSubType
                           showInView:(UIView *)showInView
                              success:(void (^)(void))success
                              failure:(void (^)(NSString *failureInfo))failure
                  OtherResponseStatus:(void (^)(SSDKResponseState state))otherResponseStatus;
/**
 *  视频QQ空间分享
 */
+(void)ShareQQParamsByText:(NSString *)text
                     title:(NSString *)title
                       url:(NSURL *)url
             audioFlashURL:(NSURL *)audioFlashURL
             videoFlashURL:(NSURL *)videoFlashURL
                thumbImage:(id)thumbImage
                    images:(id)images
                      type:(SSDKContentType)type
        forPlatformSubType:(SSDKPlatformType)platformSubType
                showInView:(UIView *)showInView;

//分享视频到其他客户端
+ (void)shareVedioWithPlatformType:(SSDKPlatformType)platformType
                         Text:(NSString *)text
                        title:(NSString *)title
                          url:(NSString *)url
                   thumbImage:(id)thumbImage
                        image:(id)image
                 musicFileURL:(NSURL *)musicFileURL
                      extInfo:(NSString *)extInfo
                     fileData:(id)fileData
                 emoticonData:(id)emoticonData
          sourceFileExtension:(NSString *)fileExtension
               sourceFileData:(id)sourceFileData
                         type:(SSDKContentType)type
               onStateChanged:(doneblock)block;

/**
 *  第三方登录
 */
+(void)thirdLoginWithType:(SSDKPlatformType)type result:(ThirdLoginResult)loginResult;

//微信第三方登录
+(void) thirdLoginWithWeChatResult;

@end
